package server.Servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import server.Dao.UnionTableDao;
import server.Dao.impl.UnionTableDaoImpl;
public class UnionTableServlet2 extends HttpServlet {

	public UnionTableServlet2() {
		super();
	}
	public void destroy() {
		super.destroy();
	}
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		response.setContentType("text/html");
		PrintWriter out = response.getWriter();
		
		String tableId1 = request.getParameter("tableId1");
		String tableId2 = request.getParameter("tableId2");
		
		UnionTableDao dao = new UnionTableDaoImpl();
		//o//ut.println("fuck");

		dao.updateStatus(new Integer(tableId1).intValue(), new Integer(tableId2).intValue());
	
		out.flush();
		out.close();
	}

	public void init() throws ServletException {
	}

}
